﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
	<style type="text/css">
		.pages a
		{
			display: inline-block;
			width: 20px;
		}
	</style>
</head>
<body>
	<form id="form1" runat="server">
	<t:Manager runat="server">
		<Includes>
			<t:StyleFileInclude Src="~/Res/CSS/main.css" />
		</Includes>
		<Scenarios>
			<t:PostScenario ID="psReload" runat="server" ReturnControlIds="rpt">
			</t:PostScenario>
		</Scenarios>
	</t:Manager>
	<div>
		<h1>
			Repeater</h1>
		<div>
			<t:Button ID="btnLoadNoReflection" runat="server" Text="Load w/o reflection">
				<Click PostScenarioId="psReload" OnServer="btnLoadNoReflection_Click" />
			</t:Button>
			<t:Button ID="btnLoadReflection" runat="server" Text="Load w/ reflection">
				<Click PostScenarioId="psReload" OnServer="btnLoadReflection_Click" />
			</t:Button>
		</div>
		<t:Repeater runat="server" ID="rpt" EnableServerRender="false" OnCreateEntry="rpt_CreateEntry">
			<ItemUpdated PostScenarioId="_psEmpty" OnServer="rpt_ItemUpdated" />
			<LoadEntries OnServer="rpt_LoadEntries" PostScenarioId="_psEmpty" />
			<Header>
				<Template>
					<div itemscontainer="1">
				</Template>
			</Header>
			<ViewItem>
				<Template>
					<div class="item">
						A:
						<t:Label runat="server" ID="lblA" Data-Field="Alpha" />
						, B:
						<t:Label runat="server" ID="lblB" Data-Field="Beta" />
						, C:
						<t:Label runat="server" ID="lblC" Data-Field="Castle" />
						<t:Button runat="server" ID="btnEdit" Text="Edit" Click-Client="this.get_Container().FireCommand('Edit');">
						</t:Button>
					</div>
				</Template>
			</ViewItem>
			<EditItem>
				<Template>
					<div class="item">
						A:
						<t:TextBox runat="server" ID="txtA" Data-Field="Alpha" style="width: 20px;">
						</t:TextBox>
						, B:
						<t:TextBox runat="server" ID="txtB" Data-Field="Beta" style="width: 20px;">
						</t:TextBox>
						, C:
						<t:TextBox runat="server" ID="txtC" Data-Field="Castle" Data-StoringType="Integer" style="width: 20px;">
						</t:TextBox>
						<t:Button runat="server" ID="btnSave" Text="Save" Click-Client="this.get_Container().FireCommand('SaveClose');">
						</t:Button>
					</div>
				</Template>
			</EditItem>
			<Footer>
				<Template>
					</div>
				</Template>
			</Footer>
			<Pager Size="10" ButtonCount="7">
			</Pager>
		</t:Repeater>
	</div>
	</form>
</body>
</html>
